home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 4
/
CDPD_IV.bin
/
e
/
mailinglists
/
amigae.0993sept.archive
/
000077_crash!vaxca1.unica.it!CASANOVA_Tue, 28 Sep 93 03:44:14 PST.msg
< prev
next >
Wrap
Internet Message Format
|
1994-05-26
|
826b
Received: by bkhouse.cts.com (V1.16/Amiga)
id AA00000; Tue, 28 Sep 93 03:44:14 PST
Received: from VAXCA1.UNICA.IT by crash.cts.com with smtp
(Smail3.1.28.1 #18) id m0ohcI1-00008sC; Tue, 28 Sep 93 03:28 PDT
Date: Tue, 28 Sep 1993 11:31:50 +0200 (CET)
Message-Id: <930928113150.b72@vaxca1.unica.it>
X-Vmsmail-To: SMTP%"amigae@bkhouse.cts.com"
From: CASANOVA@vaxca1.unica.it
To: amigae@bkhouse.cts.com
Subject: random numbers
TO: UMLANGSTON
ok test the simple algorithm made by D. Lehmer
a[0] = seed;
for ( i =1 ; i < N ; i++)
a[i] = (a[i-1]*b+1) % m;
the result will be an integer between 0 and m-1.
Pay attention for values of seed,b and m : m must by power of 10 or 2,
b will be one digit less than m. Third rule b must end with x21,
x must be even!! this is important.
By and enjoy . Ignazio